package W111123;

public class Host {
	public void letCry(Animal animal){
			animal.cry();
	}
	public Animal donateAnimal(String type){
		Animal animal = null;
		if(type.equals("dog")){
			animal= new Dog();
		} else if(type.equals("cat")){
			animal= new Cat();
		}if(type.equals("duck")){
			animal= new Duck();
		}
		return animal;

	}
}
